package Lesson;

public class Demo6 {
    public static void main(String[] args) {
        getEven(13,30);
        getOdd(13,30);
    }

    public static void getEven(int n, int m){
        System.out.println(n+"到"+m+"之间的偶数为：");
        for(int i = n; i <= m; i++){
            if(i%2 == 0){
                System.out.println(i);
            }
        }
    }

    public static void getOdd(int n, int m){
        System.out.println(n+"到"+m+"之间的奇数为：");
        for(int i = n; i <= m; i++){
            if(i%2 != 0){
                System.out.println(i);
            }
        }
    }
}
